patch: allow a autorunscript to enable ar_nowait

Post there if you plan to contribute to this SystemCd
gernot
Posts: 1127
Joined: 07 Apr 2010, 16:19

patch: allow a autorunscript to enable ar_nowait

Postby gernot » 28 Jun 2011, 17:57

Allow the user to activate ar_nowait from a script using "touch /etc/ar_nowait"


[email protected] /root % diff -c /livemnt/squashfs/usr/sbin/autorun /usr/sbin/autorun
*** /livemnt/squashfs/usr/sbin/autorun 2011-06-25 15:23:32.000000000 +0000
--- /usr/sbin/autorun 2011-06-28 19:55:52.182153147 +0000
***************
*** 156,161 ****
--- 156,164 ----
if found==0:
found+=search_autoruns(curdir, ar_autoruns, copyfilefct_basic)

+ # ---- remove user setable ar_nowait flag if set ----
+ if os.path.isfile('/etc/ar_nowait'):
+ os.unlink('/etc/ar_nowait')
# ---- execute the autorun scripts found ----
for curfile in autorunfiles:
processdostextfiles(curfile)
***************
*** 182,187 ****
--- 185,192 ----
os.unlink(curfile)

# ---- wait a keypress feature -----
+ if os.path.isfile('/etc/ar_nowait'):
+ ar_nowait='y'
if ar_nowait=='n' and len(autorunfiles)>0:
print 'end of autorun scripts, press <Enter> to continue'
sys.stdin.read(1)

admin
Site Admin
Posts: 2715
Joined: 17 Jul 2003, 09:44

Re: patch: allow a autorunscript to enable ar_nowait

Postby admin » 09 Jul 2011, 06:37

Thanks for your contrib, it will be in the next beta version


Return to “Contributions”

Who is online

Users browsing this forum: Google [Bot] and 1 guest