-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
package/run.rclocal will find both /etc/rc.local /etc/rc.d/rc.local
- Loading branch information
1 parent
58987d6
commit a299528
Showing
2 changed files
with
7 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
#!/bin/bash | ||
|
||
if grep svscanboot /etc/rc.local >/dev/null | ||
if grep svscanboot $1 >/dev/null | ||
then | ||
echo 'rc.local contains an svscanboot line. I assume that svscan is already running.' | ||
else | ||
echo 'Adding svscanboot to /etc/rc.local...' | ||
rm -f /etc/rc.local'{new}' | ||
cat /etc/rc.local package/boot.rclocal > /etc/rc.local'{new}' | ||
mv -f /etc/rc.local'{new}' /etc/rc.local | ||
echo "Adding svscanboot to $1..." | ||
rm -f ${1}'{new}' | ||
cat $1 package/boot.rclocal > ${1}'{new}' | ||
mv -f ${1}'{new}' $1 | ||
echo 'Reboot now to start svscan.' | ||
fi |