diff core/sysvinit/rc.init @ 516:014d018468fb

core: use new FHS
author David Demelier <markand@malikania.fr>
date Tue, 09 Apr 2019 20:22:00 +0200
parents 0d51fe2867b5
children
line wrap: on
line diff
--- a/core/sysvinit/rc.init	Tue Apr 09 20:20:00 2019 +0200
+++ b/core/sysvinit/rc.init	Tue Apr 09 20:22:00 2019 +0200
@@ -24,36 +24,36 @@
 	printf "\nWelcome to \033[34mVanilla Linux\033[0m\n\n"
 fi
 
-if [ -n "$HOSTNAME" ] && [ -x /usr/bin/hostname ]; then
+if [ -n "$HOSTNAME" ] && [ -x /bin/hostname ]; then
 	echo "Setting hostname: $HOSTNAME"
-	/usr/bin/hostname "$HOSTNAME"
+	/bin/hostname "$HOSTNAME"
 fi
 
-if [ -x /usr/sbin/sysctl ]; then
+if [ -x /bin/sysctl ]; then
 	echo "Setting kernel parameters."
-	/usr/sbin/sysctl -p >/dev/null 2>&1
+	/bin/sysctl -p >/dev/null 2>&1
 fi
 
-if [ -x /usr/bin/mountpoint ]; then
+if [ -x /bin/mountpoint ]; then
 	echo -n "Mounting filesystems: "
 
-	if ! /usr/bin/mountpoint /dev >/dev/null 2>&1; then
-		/usr/bin/mount -t devtmpfs devtmpfs /dev >/dev/null 2>&1
+	if ! /bin/mountpoint /dev >/dev/null 2>&1; then
+		/bin/mount -t devtmpfs devtmpfs /dev >/dev/null 2>&1
 		echo -n "/dev "
 	fi
 
-	if ! /usr/bin/mountpoint /proc >/dev/null 2>&1; then
-		/usr/bin/mount -t proc proc /proc >/dev/null 2>&1
+	if ! /bin/mountpoint /proc >/dev/null 2>&1; then
+		/bin/mount -t proc proc /proc >/dev/null 2>&1
 		echo -n "/proc "
 	fi
 
-	if ! /usr/bin/mountpoint /sys >/dev/null 2>&1; then
-		/usr/bin/mount -t sysfs sysfs /sys >/dev/null 2>&1
+	if ! /bin/mountpoint /sys >/dev/null 2>&1; then
+		/bin/mount -t sysfs sysfs /sys >/dev/null 2>&1
 		echo -n "/sys "
 	fi
 
-	if ! /usr/bin/mountpoint /run >/dev/null 2>&1; then
-		/usr/bin/mount -t tmpfs tmpfs /run >/dev/null 2>&1
+	if ! /bin/mountpoint /run >/dev/null 2>&1; then
+		/bin/mount -t tmpfs tmpfs /run >/dev/null 2>&1
 		echo -n "/run "
 	fi
 
@@ -64,32 +64,32 @@
 	/etc/rc.d/udevd start
 fi
 
-if [ -x /usr/sbin/fsck ]; then
+if [ -x /bin/fsck ]; then
 	# Make sure / is ro in case of initrd.
-	/usr/bin/mount -o remount,ro /
+	/bin/mount -o remount,ro /
 
 	# If /etc/forcefsck is there, force check.
 	if [ -f /etc/forcefsck ]; then
 		force="-f"
 	fi
 
-	/usr/sbin/fsck $force -A -T -C -a >/dev/null 2>&1
+	/bin/fsck $force -A -T -C -a >/dev/null 2>&1
 
 	if [ "$?" -gt 1 ]; then
 		echo "* Filesystem check failed"
-		/usr/sbin/sulogin -p
+		/bin/sulogin -p
 	fi
 fi
 
 # Remount / and enable swap as the system is ready.
-/usr/bin/mount -o remount,rw /
-/usr/sbin/swapon -a
+/bin/mount -o remount,rw /
+/bin/swapon -a
 
 if [ -n "$TIMEZONE" ]; then
 	echo -n "Setting timezone: "
 
-	if [ -f /usr/share/zoneinfo/$TIMEZONE ]; then
-		/usr/bin/ln -sf /usr/share/zoneinfo/$TIMEZONE /etc/localtime
+	if [ -f /share/zoneinfo/$TIMEZONE ]; then
+		/bin/ln -sf /share/zoneinfo/$TIMEZONE /etc/localtime
 		echo "$TIMEZONE."
 	else
 		echo "$TIMEZONE not found."